{extend name="public:layout" /}
{block name="title"}车辆详情列表{/block}
{block name="head"}
	<style>
		body{font-family: Arial,"Microsoft Yahei";}
	</style>
{/block}
{block name="body"}

<div class="wrap">
    <div class="tabs wx_tabs">
        <a href="#" hidefocus="true" class="active">车辆状态</a>
        <a href="#" hidefocus="true">订单列表</a>
        <a href="#" hidefocus="true">车辆详情</a>
    </div>    
    <div class="swiper-container">
        <div class="swiper-wrapper">
        	<!--车辆状态-->
	        <div class="swiper-slide">
	           	<div class="content-slide">
	           		<!--正在出车的页面-->
	           		<p style="padding-left: 8px;margin-top: 25px;color: red;">正在出车中......</p>
	              	<div class="weui-cells weui-cells_form x_weui_cells">
				        <div class="weui-cell x_weui_cell">
				            <div class="weui-cell__hd"><label class="weui-label">订单编号：</label></div>
				            <div class="weui-cell__bd">
				                <div>{$info.order_odd}</div>
				            </div>
				        </div>
				        <div class="weui-cell x_weui_cell">
				            <div class="weui-cell__hd"><label class="weui-label">车牌号：</label></div>
				            <div class="weui-cell__bd">
				                <div>{$info.car_sn}</div>
				            </div>
				        </div>
				        <div class="weui-cell x_weui_cell">
				            <div class="weui-cell__hd"><label class="weui-label">车辆类型：</label></div>
				            <div class="weui-cell__bd">
				                <div>{:get_field_value('car','car_brand',['car_sn'=>$info['car_sn']])}</div>
				            </div>
				        </div>
				        <div class="weui-cell x_weui_cell">
				            <div class="weui-cell__hd"><label class="weui-label">司机姓名：</label></div>
				            <div class="weui-cell__bd">
				                <div>{$info.driver}</div>
				            </div>
				        </div>
				        <div class="weui-cell x_weui_cell">
				            <div class="weui-cell__hd"><label class="weui-label">客户姓名：</label></div>
				            <div class="weui-cell__bd">
				                <div>{$info.order_client}</div>
				            </div>
				        </div>
				        <div class="weui-cell x_weui_cell">
				            <div class="weui-cell__hd"><label class="weui-label">客户联系方式：</label></div>
				            <div class="weui-cell__bd">
				                <div>{$info.order_phone}</div>
				            </div>
				        </div>
				        <div class="weui-cell x_weui_cell">
				            <div class="weui-cell__hd"><label class="weui-label">预计出发：</label></div>
				            <div class="weui-cell__bd">
				                {$info.order_start_time}
				            </div>
				        </div>
				        <div class="weui-cell x_weui_cell">
				            <div class="weui-cell__hd"><label class="weui-label">预计完成：</label></div>
				            <div class="weui-cell__bd">
				                {$info.order_end_time}
				            </div>
				        </div>
				    </div>
				    <!--正在空闲的车辆-->
				   	<div style="height: 50px;line-height: 50px;padding-left: 8px;color: red;">正在空闲中......</div>
				   	<!--维修中的车辆-->
				   	<p style="padding-left: 8px;margin-top: 25px;color: red;">正在维修中......</p>
				   	<div class="weui-cells weui-cells_form x_weui_cells">
				        <div class="weui-cell x_weui_cell">
				            <div class="weui-cell__hd"><label class="weui-label">车牌号：</label></div>
				            <div class="weui-cell__bd">
				                <div>{$info.car_sn}</div>
				            </div>
				        </div>
				        <div class="weui-cell x_weui_cell">
				            <div class="weui-cell__hd"><label class="weui-label">经手人：</label></div>
				            <div class="weui-cell__bd">
				                <div>{$info.driver}</div>
				            </div>
				        </div>
				        <div class="weui-cell x_weui_cell">
				            <div class="weui-cell__hd"><label class="weui-label">维修开始时间</label></div>
				            <div class="weui-cell__bd">
				                <div>{$info.ser_start_time}</div>
				            </div>
				        </div>
				        <div class="weui-cell x_weui_cell">
				            <div class="weui-cell__hd"><label class="weui-label">预计取车时间：</label></div>
				            <div class="weui-cell__bd">
				                <div>{$info.ser_end_time}</div>
				            </div>
				        </div>
				        <div class="weui-cell x_weui_cell">
				            <div class="weui-cell__hd"><label class="weui-label">维修原因：</label></div>
				            <div class="weui-cell__bd">
				                {$info.ser_reason}
				            </div>
				        </div>
				    </div>
				   	<!--保养中的页面-->
				   	<p style="padding-left: 8px;margin-top: 25px;color: red;">正在保养中......</p>
				   	<div class="weui-cells weui-cells_form x_weui_cells">
				        <div class="weui-cell x_weui_cell">
				            <div class="weui-cell__hd"><label class="weui-label">车牌号：</label></div>
				            <div class="weui-cell__bd">
				                <div>{$info.car_sn}</div>
				            </div>
				        </div>
				        <div class="weui-cell x_weui_cell">
				            <div class="weui-cell__hd"><label class="weui-label">经手人：</label></div>
				            <div class="weui-cell__bd">
				                <div>{$info.driver}</div>
				            </div>
				        </div>
				        <div class="weui-cell x_weui_cell">
				            <div class="weui-cell__hd"><label class="weui-label">保养开始时间</label></div>
				            <div class="weui-cell__bd">
				                <div>{$info.ser_start_time}</div>
				            </div>
				        </div>
				        <div class="weui-cell x_weui_cell">
				            <div class="weui-cell__hd"><label class="weui-label">预计取车时间：</label></div>
				            <div class="weui-cell__bd">
				                <div>{$info.ser_end_time}</div>
				            </div>
				        </div>
				        <div class="weui-cell x_weui_cell">
				            <div class="weui-cell__hd"><label class="weui-label">保养原因：</label></div>
				            <div class="weui-cell__bd">
				                {$info.ser_reason}
				            </div>
				        </div>
				    </div>
	          	</div>
	        </div>
	        <!--订单列表-->
	        <div class="swiper-slide mescroll" id="mescroll">
	            <div class="content-slide"  id="content-slide"></div>
	        </div>
	        <!--车辆详情-->
	        <div class="swiper-slide">
	            <div class="content-slide">
	            	<div>
	            		<div class="weui-flex xz_weui_flex">
						    <div class="weui-flex__item" style="background: #ff9194;">
						  		<p>总订单数</P>
						  		<p>3999</P>
						    </div>
						    <div class="weui-flex__item" style="background: #92ffff;">
						    	<p>总订单费用</P>
						  		<p>2850088</P>
						    </div>
						    <div class="weui-flex__item" style="background: #e48ef3;">
						    	<p>总公里数</P>
						  		<p>2355</P>
						    </div>
						</div>
						<div class="weui-flex xz_weui_flex">
						    <div class="weui-flex__item" style="background: #ffd990;">
						  		<p>总里程数</P>
						  		<p>3999</P>
						    </div>
						    <div class="weui-flex__item" style="background: #9490ff;">
						    	<p>总加油数</P>
						  		<p>2850088</P>
						    </div>
						</div>
						<div class="weui-flex xz_weui_flex">
						    <div class="weui-flex__item" style="background: #ff9194;">
						  		<p>违章次数</P>
						  		<p>3999</P>
						    </div>
						    <div class="weui-flex__item" style="background: #92ffff;">
						    	<p>保险次数</P>
						  		<p>2850088</P>
						    </div>
						    <div class="weui-flex__item" style="background: #e48ef3;">
						    	<p>年检次数</P>
						  		<p>2355</P>
						    </div>
						    <div class="weui-flex__item" style="background: #ffd990;">
						    	<p>事故次数</P>
						  		<p>2355</P>
						    </div>
						</div>
	            	</div>
	             	<div class="weui-cells weui-cells_form x_weui_cells">
						<div class="weui-cell x_weui_cell">
						    <div class="weui-cell__hd"><label class="weui-label">车牌号：</label></div>
						    <div class="weui-cell__bd">
						      <div>{$info.car_sn}</div>
						    </div>
						</div>
						<div class="weui-cell x_weui_cell">
						    <div class="weui-cell__hd"><label class="weui-label">车辆品牌类型：</label></div>
						    <div class="weui-cell__bd">
						      <div>{$info.car_brand}</div>
						    </div>
						</div>
						<div class="weui-cell x_weui_cell">
						    <div class="weui-cell__hd"><label class="weui-label">车辆型号：</label></div>
						    <div class="weui-cell__bd">
						      <div>{$info.car_brand}</div>
						    </div>
						</div>
						<div class="weui-cell x_weui_cell">
						    <div class="weui-cell__hd"><label class="weui-label">座位数：</label></div>
						    <div class="weui-cell__bd">
						      <div>{$info.car_seat}</div>
						    </div>
						</div>
						<div class="weui-cell x_weui_cell">
						    <div class="weui-cell__hd"><label class="weui-label">车辆颜色：</label></div>
						    <div class="weui-cell__bd">
						      <div>{$info.car_color}</div>
						    </div>
						</div>
						<div class="weui-cell x_weui_cell">
						    <div class="weui-cell__hd"><label class="weui-label">车辆油耗：</label></div>
						    <div class="weui-cell__bd">
						      <div>{$info.break_fine}</div>
						    </div>
						</div>
						<div class="weui-cell x_weui_cell">
						    <div class="weui-cell__hd"><label class="weui-label">保养公里数：</label></div>
						    <div class="weui-cell__bd">
						      <div>{$info.car_mm}</div>
						    </div>
						</div>
					</div>
	            </div>
	        </div>
	    </div>
    </div>
</div>

<!--返回首页-->
<div class="back_index">
	<a href="/system">
		<img class="back_img" src="/public/mobile/static/images/back1.png" />
	</a>
</div>
{/block}
{block name="script"}
	{block name="script"}
	<script id="test" type="text/html">  
		<!--模板-->
    	{{ each rows}} 
    	<div class="weui_cell list_weui_cells xz_list" style="border-bottom:15px solid #e8e8e8;">
            <div class="weui_cell_bd weui_cell_primary">
                <div class="wuliao-title">
                    <label>{{ $value.title }}</label>
                    <span>-{{ $value.car_sn }}</span>
                </div>

                <div class="detail clearfix">
                    <span class="date">开始日期：<label style="color:#989898">{{ $value.order_start_time }}</label></span>
                    {{ if $value.car_status>=1 }}
                    <br><span class="date">实际出发：<label>{{ $value.out_time }}</label></span>
                    {{ /if }}
                    <span class="date">结束日期：<label style="color:#989898">{{ $value.order_end_time }}</label></span>
                    {{ if $value.car_status>=2 }}
                    <br><span class="date">实际结束：<label>{{ $value.back_time }}</label></span>
                    {{ /if }}
                    <span class="date">客户：<label>{{ $value.order_client }}{{ $value.order_phone }}</label></span>
                </div>

                <div style="padding:10px;">
                    {{ if $value.car_status==0 }}
                    <a href="{:url('Op/edit',['tpl'=>'order_start'])}&mid={{ $value.mid }}&aid={{ $value.aid }}" class="weui-btn weui-btn_primary">出车</a>
                    {{ /if }}
                    {{ if $value.car_status==1 }}
                    <a href="{:url('Op/edit',['tpl'=>'order_end'])}&mid={{ $value.mid }}&aid={{ $value.aid }}" class="weui-btn weui-btn_primary">收车</a>
                    <a href="{:url('Op/edit',['tpl'=>'order_delay'])}&mid={{ $value.mid }}&aid={{ $value.aid }}" class="weui-btn weui-btn_warn">延期</a>
                    {{ /if }}
                    {{ if $value.car_status==2 }}
                    <a href="{:url('Op/edit',['tpl'=>'order_info'])}&mid={{ $value.mid }}&aid={{ $value.aid }}" class="weui-btn weui-btn_primary">订单详情</a>
                    {{ /if }}
                </div>
            </div>
       </div>
	    {{ /each }}
	</script>  
	<script type="text/javascript">
		$(function () {
		    var order_type="{$Request.param.order_type}";
            initPage('content-slide','/system/logic.query/driverorder.html?mid=14',{order_type:order_type},'test');
        });
        
		
		var tabsSwiper = new Swiper('.swiper-container',{
			speed:500,
			onSlideChangeStart: function(){
				$(".tabs .active").removeClass('active');
				$(".tabs a").eq(tabsSwiper.activeIndex).addClass('active');
			}
		});
		
		$(".tabs a").on('touchstart mousedown',function(e){
			e.preventDefault()
			$(".tabs .active").removeClass('active');
			$(this).addClass('active');
			tabsSwiper.swipeTo($(this).index());
		});
		
		$(".tabs a").click(function(e){
			e.preventDefault();
		});
	</script>
	
{/block}
